<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>个人记录</title>
    <link rel="stylesheet"  href="src/css/base.css?__version=9.4">
    <link rel="stylesheet"  href="src/css/pages.css?__version=9.4">
    <script type="text/javascript" src="src/js/jquery-1.10.1.min.js?__version=9.4"></script>
    <script type="text/javascript" src="src/js/rem.js?__version=9.4"></script>
    <script type="text/javascript" src="src/js/dropload.js?__version=9.4"></script>
    <script type="text/javascript" src="src/js/init.js?__version=9.4"></script>

	<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script src="/src/js/share.js?__version=9.4"></script>
    <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?8ed2efe5b24e14f351f4d88ba2eb3462";
      var s = document.getElementsByTagName("script")[0]; 
      s.parentNode.insertBefore(hm, s);
    })();
    </script>
</head>
<body>
	<div class="init_content" style="display: none;">
    <div class="warp userecord_warp" id="htmlDataList">
	</div>
	</div>
	<div class="init_loading">
        <img src="src/img/page_loading.gif?v=1">
    </div>
</body>
<script>
var machine_id=cookieGet("machine_id");
addheader("个人记录","/show.html?machine_id="+machine_id);
var uid=getQueryString('uid');
$(function(){
    checkUserLogin();
    fetchData("/OpenAPI/V1/User/playList",{token:token,uid:uid,page:1},function(data){
        console.log(data)
        if(data.nickname==cookieGet('nickname')){
            var text="共抓了"
        }else{
            var text="共抓中了"
        }
        var htmlDataList = '';
            htmlDataList+='<div class="userecordinfo">'
            htmlDataList+='<img src="'+data.avatar+'">'
            htmlDataList+='<p>'+data.nickname+'</p>'
            htmlDataList+='<p>'+text+''+data.total_cnt+'次</p>'
            htmlDataList+='</div>'
            htmlDataList+='<div class="caption userecordlist">'
            if(data.list.length>0){
                for(var i=0;i<data.list.length;i++){
                    var result ='',color='';
                    result=data.list[i]['result']=='1'?'抓中了':'未命中';
                    color=data.list[i]['result']=='1'?'color':'';

                    if(data.list[i]['result']=='1'){
                        htmlDataList+='<div class="item flex">'
                                    +'<img src="'+data.list[i]['cover']+'">'
                                    +'<div class="info"><p class="name text-beyond">'+data.list[i]['title']+'</p><p class="time text-beyond">2'+data.list[i]['start_time']+'<span style="margin-left:10px;font-size:12px;" class="'+color+'">'+result+'</span></p></div>'
                                    +'<a href="/user_playrecord.html?gameid='+data.list[i]["game_id"]+'&&uid='+uid+'" class="align-right"><img src="/src/img/play.png"></a>'
                                    +'</div>'
                    }else{
                        htmlDataList+='<div class="item"><a class="flex" href="/capturedetails.html?play_id='+data.list[i]['game_id']+'">'
                                +'<img class="img" src="'+data.list[i]['cover']+'">'
                                +'<div class="info"><p class="name text-beyond">'+data.list[i]['title']+'</p><p class="time text-beyond">2'+data.list[i]['start_time']+'</p></div>'
                                +'<span class="align-right '+color+'">'+result+'</span>'
                                +'</a></div>'
                    }
                }
            }else{
                htmlDataList+='<div style="height:100px;line-height:100px;text-align:center;font-size:16px;color:#666;">还没抓中哟～</div>'
            }
            htmlDataList+='</div>';
            $("#htmlDataList").append(htmlDataList);
    });

});



</script>
</html>